#ifndef CODE_GENERATOR_H
#define CODE_GENERATOR_H

#include <QString>

class BBClass;

class CodeGenerator
{
public:
	static CodeGenerator* instance();

	void generateClasses( QString xmlFilePath, QString classesDestiny );
		
private:
	CodeGenerator()
	{
		//DOES NOTHING
	}

	~CodeGenerator()
	{
		//DOES NOTHING
	}

	void createClassHeaderFile( BBClass& userClass, QString classesDestiny );

	void createClassSourceFile( BBClass& userClass, QString classesDestiny );

	void createClassBearHeaderFile( BBClass& userClass, QString classesDestiny );

	void createClassBearSourceFile( BBClass& userClass, QString classesDestiny );

	QString convertToUppercase( QString& word );

	QString getConvertMethodByType( QString type );

	QString buildPrimitiveGetSetHeader( QString& attributeName, QString& attributeType );

	QString buildPrimitiveGetSetSource( QString& className, QString& attributeName, QString& attributeType, QString& columnName );

	static CodeGenerator* m_instance;
};

#endif